import {RequestUtil} from '@/utils'

export class SystemHttp {

    static PREFIX = "/manager/system"

    // 分页查询 登陆日志
    static getScheduleAppPage = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/schedule/app/pageList`, params)

    static scanApp = () => RequestUtil.postAjax(`${this.PREFIX}/schedule/app/scan`)

    static getScheduleTaskPage = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/schedule/task/pageList`, params)

    static addTask = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/schedule/task/add`, data)

    static updateTask = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/schedule/task/update/${id}`, data)

    // 手动执行定时任务
    static runNow = (id: string | number) => RequestUtil.postAjax(`${this.PREFIX}/schedule/task/run/${id}`)

    static delTask = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/schedule/task/delete`, data)

    // 查询定时任务执行记录 登陆日志
    static getScheduleRecordPage = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/schedule/record/pageList`, params)



}
